package com.kmxd.ams.client.system.vo;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.*;
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.kmxd.ams.core.common.annotation.ExcelDict;
import com.kmxd.ams.core.excel.convert.ExcelDictConverter;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 角色表
 *
 * @author admin
 * @since 2022-03-24
 */
@Data
@ColumnWidth(15)
@HeadRowHeight(15)
@ContentRowHeight(15)
@HeadStyle
@HeadFontStyle(fontHeightInPoints = 12)
@ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER)
@ContentFontStyle(fontHeightInPoints = 10)
@ExcelIgnoreUnannotated
public class SysRoleListVO implements Serializable {

  private static final long serialVersionUID = 1L;

  /** 主键 */
  @JsonSerialize(using = ToStringSerializer.class)
  private Long id;

  /** 公司ID */
  @JsonSerialize(using = ToStringSerializer.class)
  private Long comId;

  /** 角色编码 */
  @ExcelProperty(value = "角色编码", index = 1)
  private String roleCode;

  /** 角色名称 */
  @ExcelProperty(value = "角色名称", index = 0)
  private String roleName;

  /** 角色类型 */
  @ExcelProperty(value = "角色类型", index = 0)
  private String roleType;

  /** 数据范围 1全部数据权限；2自定义数据权限；3本部门数据权限；4本部门及以下数据权限 */
  @ExcelProperty(value = "数据范围", index = 2, converter = ExcelDictConverter.class)
  @ExcelDict("sys_data_scope")
  private String dataScope;

  /** 备注 */
  @ExcelProperty(value = "备注", index = 5)
  private String remarks;

  /** 排序 */
  @ExcelProperty(value = "排序", index = 3)
  @JsonSerialize(using = ToStringSerializer.class)
  private Integer sort;

  /** 是否是敏感角色 1敏感角色0非敏感角色 */
  @JsonSerialize(using = ToStringSerializer.class)
  private Integer roleSensitive;

  /** 状态 0正常；1停用 */
  @ExcelProperty(value = "状态", index = 4, converter = ExcelDictConverter.class)
  @ExcelDict("sys_status")
  private String status;

  /** 创建人 */
  private String createBy;

  /** 创建时间 */
  @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
  @ColumnWidth(20)
  @ExcelProperty(value = "创建时间", index = 6)
  private Date createTime;

  /** 更新人 */
  private String updateBy;

  /** 更新时间 */
  @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
  @ColumnWidth(20)
  @ExcelProperty(value = "更新时间", index = 7)
  private Date updateTime;
}
